home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / Samples / Moofwars 1.02 / MoofWars Encoder / •Headers / GridTilesFormat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-15  |  1.9 KB  |  64 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************
  2. #
  3. #    GridTilesFormat.h
  4. #    
  5. #    This file describes the formats of a TileCollection and a TileGrid.  We provide them both here so
  6. #   that our applications that build compiled files can also access the resource format.
  7. #
  8. #    Author: Timothy Carroll
  9. #    Apple Developer Technical Support
  10. #    timc@apple.com
  11. #
  12. #    Modification History: 
  13. #
  14. #    8/15/96        TMC     Initial Release
  15. #
  16. #    Copyright © 1996 Apple Computer, Inc., All Rights Reserved
  17. #
  18. #
  19. #    You may incorporate this sample code into your applications without
  20. #    restriction, though the sample code has been provided "AS IS" and the
  21. #    responsibility for its operation is 100% yours.  However, what you are
  22. #    not permitted to do is to redistribute the source as "DSC Sample Code"
  23. #    after having made changes. If you're going to re-distribute the source,
  24. #    we require that you make it clear in the source that the code was
  25. #    descended from Apple Sample Code, but that you've made changes.
  26. #
  27. *************************************************************************************/
  28.  
  29.  
  30. /****************************************************************************************************
  31. Resource Data Structures
  32. ****************************************************************************************************/
  33.  
  34. typedef struct TileCollectionResHeader TileCollectionResHeader;
  35. const UInt32 TileCollectionResType = 'TILE';
  36.  
  37. struct TileCollectionResHeader
  38. {
  39.     UInt32 version;
  40.     SInt16 depth;
  41.     UInt16 flags;
  42.     UInt32 numTiles;
  43.     
  44.     // Followed by 1k per tile in 32x32x8 bit format.
  45. };
  46.  
  47.  
  48. typedef UInt16 CellGridType;
  49.  
  50. typedef struct TileGridResHeader TileGridResHeader;
  51. const UInt32 TileGridResType = 'GRID';
  52.  
  53. struct TileGridResHeader
  54. {
  55.     UInt32 version;
  56.     UInt16 flags;
  57.     SInt16 tileResID;
  58.     UInt32 width;
  59.     UInt32 height;
  60.     UInt32 defaultTile;
  61.  
  62.     // followed by width x height x CellGridType for tile information in row x column format.
  63. };
  64.